<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>财务</title>
    
	<jsp:include page="../inc.jsp"></jsp:include>
	<script type="text/javascript">
		$(function() {
			//初始化数据表格
		$('#f_i_datagrid').datagrid({
			url : '${pageContext.request.contextPath}/financeAction!findAllFinance.action',
			fit : true,
			fitColumns : true,
			border : false,
			pagination : true,
			idField : 'id',
			pageSize : 15,
			pageList : [ 15, 20, 30, 40, 50 ],
			sortName : 'financeTime',
			sortOrder : 'desc',
			checkOnSelect : false,
			selectOnCheck : false,
			striped : true,
			rownumbers : true,
			singleSelect : true,
			columns : [ [{
				field : 'financeType',
				title : '数据类型',
				align : 'center',
				width : 150
			}, {
				field : 'financeMoney',
				title : '收入',
				align : 'center',
				width : 150,
				sortable : true
			}, {
				field : 'financeTime',
				title : '时间',
				align : 'center',
				width : 150,
				sortable : true
			}
			] ],
			toolbar : [{
				text : '导出Excel',
				iconCls : 'icon-add',
				handler : function() {
					zhuan();
				}
			}, '-' ]
		});
		
	});
		//导出Excel
		function zhuan(){
			
			 window.location.replace("excelAction!execute.action");
		}
	</script>
  </head>
  
  <body class="easyui-layout" data-options="fit:true,border:false">
  	<div data-options="region:'center'">
		<table id="f_i_datagrid">
			
		</table>
	</div>
  	
  </body>
</html>
